package service;

import dao.DataDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class BService {
	@Autowired
	private DataDao dataDao;
	@Transactional(propagation= Propagation.NESTED)
	public void insertB(String data){
		dataDao.insert("B1-"+data);
		dataDao.insert("B2-"+data);
	}
}
